﻿Imports System.Object
Imports VSModel
Imports Cls_Common
Partial Class FrontEnd_Control_Store_OnlineSupport
    Inherits System.Web.UI.UserControl
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then

            If Not Page.RouteData.Values("Id") Is Nothing Then
                Using Data As New VSEntities
                    Dim abc As Integer = Page.RouteData.Values("Id")
                    Dim p = (From q In Data.Stores Where q.StoreId = abc Select q).FirstOrDefault
                    If Not p Is Nothing Then
                        If Not p.YahooId Is Nothing Then
                            hplYahoo.NavigateUrl = "ymsgr:sendIM?" & p.YahooId
                            imgYahoo.ImageUrl = "http://opi.yahoo.com/online?u=" & p.YahooId & "&amp;m=g&amp;t=2 "
                            imgYahoo.Attributes.Add("style", "border:none")
                        End If

                        If Not p.SkypeId Is Nothing Then
                            hplSkype.NavigateUrl = "skype:" & p.SkypeId & "?chat"
                            imgSkype.ImageUrl = "http://mystatus.skype.com/bigclassic/" & p.SkypeId
                            imgSkype.Attributes.Add("style", "border:none")
                        End If

                        If Not p.PhoneOther Is Nothing AndAlso p.PhoneOther <> "" Then
                            ltrSoDienThoai.Text = p.Phone & " &nbsp;-&nbsp; " & p.PhoneOther
                        Else
                            ltrSoDienThoai.Text = p.Phone
                        End If

                    End If
                End Using
            End If

        End If
    End Sub
End Class
